package com.example.day2.busi.home;

import androidx.lifecycle.MutableLiveData;

import com.example.day2.entity.CommentFSParam;
import com.example.day2.entity.CommentFSResult;
import com.example.day2.entity.CommentResult;
import com.example.day2.entity.LiveResult;
import com.example.day2.entity.NoLiveReuslt;
import com.example.day2.entity.NormalResult;
import com.example.day2.entity.VideoResult;
import com.example.day2.mvvm.base.BaseViewModel;
import com.example.day2.mvvm.base.GuanZhuParam;

public class VideoViewModel extends BaseViewModel<VideoRepo> {
    public MutableLiveData<VideoResult> success =  new MutableLiveData<>();
    public MutableLiveData<String> fail = new MutableLiveData<>();
    public void getVideo(int page,int size){
        repo.getVideos(page,size,success,fail);
    }


    public MutableLiveData<NormalResult> GuanSuccess =  new MutableLiveData<>();
    public MutableLiveData<String> GuanFail = new MutableLiveData<>();
    public void getGuanzhu(GuanZhuParam guanZhuParam){
        repo.getGuanzhu(guanZhuParam,GuanSuccess,GuanFail);
    }


    public MutableLiveData<LiveResult> successLive =  new MutableLiveData<>();
    public MutableLiveData<String> failLive = new MutableLiveData<>();
    public void getLives(int page){
        repo.getLive(page,successLive,failLive);
    }


    public MutableLiveData<NoLiveReuslt> successNOLive =  new MutableLiveData<>();
    public MutableLiveData<String> failNoLive = new MutableLiveData<>();
    public void getNOlive(int page){
        repo.getNoLive(page,successNOLive,failNoLive);
    }


    public MutableLiveData<CommentResult> successCommentHQ =  new MutableLiveData<>();
    public MutableLiveData<String> failCommentHQ = new MutableLiveData<>();
    public void getCommentHQ(int page){
        repo.getCommentHQ(page,successCommentHQ,failCommentHQ);
    }


    public MutableLiveData<CommentFSResult> successCommentFS =  new MutableLiveData<>();
    public MutableLiveData<String> failCommentFs = new MutableLiveData<>();
    public void getCommentFS(CommentFSParam commentFSParam){
        repo.getCommentFS(commentFSParam,successCommentFS,failCommentFs);
    }
    @Override
    public VideoRepo createRepo() {
        return new VideoRepo();
    }
}
